package br.org.acessobrasil.portal.filtro;

import java.io.CharArrayWriter;
import java.io.PrintWriter;

import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;

public class ResponseWrapper extends HttpServletResponseWrapper {
	private CharArrayWriter output;
	private int status;
	public ResponseWrapper(HttpServletResponse response) {
		super(response);
		output = new CharArrayWriter();
	}

	public String toString() {
		return output.toString();
	}

	public PrintWriter getWriter() {
		return new PrintWriter(output);
	}
	@Override
	public void setStatus(int sc) {
		status=sc;
		super.setStatus(sc);
	}
	public int getStatus() {
		return status;
	}
}
